
import type { MaSearchItem } from '@mineadmin/search'
import {dockingMenuList} from "~/base/api/product.ts";

// const res:any = await dockingMenuList({})
const dockingMenuTypeList: any = res.data
console.log(dockingMenuTypeList,'dockingMenuTypeList')
const dockList=dockingMenuTypeList.dockList

export function dockingMenuTypeData(): any {
  return dockingMenuTypeList
}
export  function getSearchItems(): any {
  return [
    {
      label: '查询条件',
      prop: '_key_word',
      render: 'input',
    },
    {
      label: '渠道类型',
       prop: 'sptype',
       render: ({ formData }) => (
         <el-select v-model={formData.sptype}>
           {dockList.map((item) => (
             <el-option
               key={item.id}
               label={item.name}
               value={item.id}
             />
           ))}
         </el-select>
       ),
    },
  ]
}

export function getSearchItems2(): MaSearchItem[] {
  return [
    {
      label: '商品关键字',
      prop: 'xxx',
      render: 'input',
    },
  ]
}

